﻿
//验证-手机号 返回true 或 false
function Validate_phone(valStr) { var telReg = /^(0|86|17951)?(13[0-9]|15[012356789]|17[0-9]|18[0-9]|14[57])[0-9]{8}$/; return telReg.test(valStr); }

//验证-邮箱 返回true 或 false
function Validate_email(valStr) { var telReg = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/; return telReg.test(valStr); }
//验证-密码 返回true 或 false
function Validate_email(valStr) { var telReg = /^\w{6,20}$/; return telReg.test(valStr); }

function getLogin_State() {
    var ss_login = 0;
    $.ajax({
        type: "post", url: "/app/get_zs_web.ashx",
        data: { "por": "101" },
        async: false, dataType: "json", success: function (data) {
            if (data.code == 1) {
                ss_login = 1;
            }
        }
    });
    return ss_login;
}
//日期格式转换
function GetFormatDate(date_str) {
    var date = new Date(date_str);
    var dStr = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
    return dStr;
}

function getWX_link() {
    $.ajax({
        type: "post", url: "/app/get_zs_web.ashx",
        data: { "por": "161", "proid": 1 },
        async: false, dataType: "json", success: function (data) {
            if (data.code == 1) {
                window.location.href = data.url;
            }
        }
    });
}

